<?php

namespace App\Server;

class ApiService
{
    /**
     * Name: 成功返回方法
     * User: 王梓墨
     * Date: 2023/6/16
     * Time:20:56
     */
    public static function success($msg,$data)
    {
        return response()->json([
            'code' => '200',
            'msg' => $msg,
            'data' => $data
        ]);
    }

    public static function fail($msg)
    {
        return response()->json([
            'code' => '201',
            'msg' => $msg
        ]);
    }
}
